home *** CD-ROM | disk | FTP | other *** search
/ IRIX 6.5 Complementary Applications 2004 February / SGI IRIX 6.5 Complementary Applications 2004 February.iso / dist / cde.idb / usr / dt / share / include / Xm / TextInP.h.z / TextInP.h
Encoding:
C/C++ Source or Header  |  2003-11-18  |  7.0 KB  |  232 lines

  1. /*
  2.  * TextInP.h
  3.  *
  4.  * Copyright 2000, Silicon Graphics, Inc.
  5.  * ALL RIGHTS RESERVED
  6.  * 
  7.  * UNPUBLISHED -- Rights reserved under the copyright laws of the United
  8.  * States.   Use of a copyright notice is precautionary only and does not
  9.  * imply publication or disclosure.
  10.  *
  11.  * U.S. GOVERNMENT RESTRICTED RIGHTS LEGEND:
  12.  * Use, duplication or disclosure by the Government is subject to restrictions
  13.  * as set forth in FAR 52.227.19(c)(2) or subparagraph (c)(1)(ii) of the Rights
  14.  * in Technical Data and Computer Software clause at DFARS 252.227-7013 and/or
  15.  * in similar or successor clauses in the FAR, or the DOD or NASA FAR
  16.  * Supplement.  Contractor/manufacturer is Silicon Graphics, Inc.,
  17.  * 2011 N. Shoreline Blvd. Mountain View, CA 94039-7311.
  18.  *
  19.  * THE CONTENT OF THIS WORK CONTAINS CONFIDENTIAL AND PROPRIETARY
  20.  * INFORMATION OF SILICON GRAPHICS, INC. ANY DUPLICATION, MODIFICATION,
  21.  * DISTRIBUTION, OR DISCLOSURE IN ANY FORM, IN WHOLE, OR IN PART, IS STRICTLY
  22.  * PROHIBITED WITHOUT THE PRIOR EXPRESS WRITTEN PERMISSION OF SILICON
  23.  * GRAPHICS, INC.
  24.  */
  25. /* 
  26.  * @OSF_COPYRIGHT@
  27.  * (c) Copyright 1990, 1991, 1992, 1993, 1994 OPEN SOFTWARE FOUNDATION, INC.
  28.  * ALL RIGHTS RESERVED
  29.  *  
  30. */ 
  31. /*
  32.  * HISTORY
  33.  * Motif Release 1.2.5
  34. */
  35. /*   $XConsortium: TextInP.h /main/cde1_maint/2 1995/08/18 19:27:38 drk $ */
  36. /*
  37. *  (c) Copyright 1989, DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS. */
  38. /*
  39. *  (c) Copyright 1987, 1988, 1989, 1990, 1991, 1992 HEWLETT-PACKARD COMPANY */
  40. #ifndef _XmTextInP_h
  41. #define _XmTextInP_h
  42.  
  43. #include <Xm/Text.h>
  44. #include <Xm/TextStrSoP.h>
  45.  
  46. #ifdef __cplusplus
  47. extern "C" {
  48. #endif
  49.  
  50. /****************************************************************
  51.  *
  52.  * Definitions for modules implementing text input modules.
  53.  *
  54.  ****************************************************************/
  55.  
  56. typedef struct {
  57.     int x;
  58.     int y;
  59. } SelectionHint;
  60.  
  61. typedef struct _InputDataRec {
  62.     XmTextWidget widget;        /* Back-pointer to widget record. */
  63.     XmTextScanType *sarray;    /* Description of what to cycle through on */
  64.                 /* selections. */
  65.     int sarraycount;        /* Number of elements in above. */
  66.     int new_sel_length;        /* New selection length for selection moves. */
  67.     int threshold;        /* number of pixels crossed -> drag */
  68.     SelectionHint selectionHint; /* saved coords of button down */
  69.     SelectionHint Sel2Hint;    /* saved the coords of button down */
  70.     XtIntervalId select_id;
  71.     XmTextScanType stype;    /* Current selection type. */
  72.     XmTextScanDirection extendDir;
  73.     XmTextScanDirection Sel2ExtendDir;
  74.     XmTextPosition origLeft, origRight;
  75.     XmTextPosition Sel2OrigLeft, Sel2OrigRight;
  76.     XmTextPosition stuffpos;
  77.     XmTextPosition sel2Left, sel2Right; /* secondary selection */
  78.     XmTextPosition anchor;    /* anchor point of the primary selection */
  79.     Position select_pos_x;    /* x position for timer-based scrolling */
  80.     Position select_pos_y;    /* y position for timer-based scrolling */
  81.     Boolean pendingdelete;    /* TRUE if we're implementing pending delete */
  82.     Boolean syncing;        /* If TRUE, then we've multiple keystrokes */
  83.     Boolean extending;      /* true if we are extending */
  84.     Boolean Sel2Extending;    /* true if we are extending */
  85.     Boolean hasSel2;           /* has secondary selection */
  86.     Boolean has_destination;      /* has destination selection */
  87.     Boolean selectionMove;    /* delete selection after stuff */
  88.     Boolean cancel;        /* indicates that cancel was pressed */
  89.     Boolean overstrike;         /* overstrike */
  90.     Boolean sel_start;        /* indicates that a btn2 was pressed */
  91.     Time dest_time;        /* time of destination selection ownership */
  92.     Time sec_time;        /* time of secondary selection ownership */
  93.     Time lasttime;        /* Time of last event. */
  94. } InputDataRec, *InputData;
  95.  
  96.  
  97. /* 
  98.  * Create a new instance of an input object.  By the time this is called,
  99.  * the widget context has been saved.
  100.  */
  101.  
  102. #ifdef _NO_PROTO
  103. typedef void (*InputCreateProc)(); /* widget, args, num_args */
  104. #else
  105. typedef void (*InputCreateProc)(
  106.             Widget,
  107.             ArgList,
  108.             Cardinal) ;
  109. #endif
  110.  
  111. /*
  112.  * Get values out of the input object.
  113.  */
  114. #ifdef _NO_PROTO
  115. typedef void (*InputGetValuesProc)(); /* widget, args, num_args */
  116. #else
  117. typedef void (*InputGetValuesProc)(
  118.             Widget,
  119.             ArgList,
  120.             Cardinal) ;
  121. #endif
  122.  
  123. /*
  124.  * Set values in the input object.
  125.  */
  126.  
  127. #ifdef _NO_PROTO
  128. typedef void (*InputSetValuesProc)(); /* oldw, reqw, new_w, args, num_args */
  129. #else
  130. typedef void (*InputSetValuesProc)(
  131.             Widget,
  132.             Widget,
  133.             Widget,
  134.             ArgList,
  135.             Cardinal *) ;
  136. #endif
  137.  
  138. /*
  139.  * Inform input of invalidated positions.
  140.  */
  141. #ifdef _NO_PROTO
  142. typedef void (*InputInvalidateProc)(); /* ctx, position, topos, delta */
  143. #else
  144. typedef void (*InputInvalidateProc)(
  145.             XmTextWidget,
  146.             XmTextPosition,
  147.             XmTextPosition,
  148.             long) ;
  149. #endif
  150.  
  151. /*
  152.  * Get secondary resources.
  153.  */
  154. #ifdef _NO_PROTO
  155. typedef void (*InputGetSecResProc)(); /* secResDataRtn */
  156. #else
  157. typedef void (*InputGetSecResProc)(
  158.             XmSecondaryResourceData *) ;
  159. #endif
  160.  
  161.  
  162. typedef struct _InputRec {
  163.     struct _InputDataRec *data;    /* Input-specific data; opaque type. */
  164.     InputInvalidateProc Invalidate;
  165.     InputGetValuesProc  GetValues;
  166.     InputSetValuesProc    SetValues;
  167.     XtWidgetProc    destroy;
  168.     InputGetSecResProc  GetSecResData;
  169. } InputRec;
  170.  
  171.  
  172. externalref XtPointer _XmdefaultTextActionsTable;
  173. externalref Cardinal  _XmdefaultTextActionsTableSize;
  174.  
  175.  
  176.  
  177. /********    Private Function Declarations    ********/
  178. #ifdef _NO_PROTO
  179.  
  180. extern Widget _XmTextGetDropReciever() ;
  181. extern Boolean _XmTextHasDestination() ;
  182. extern Boolean _XmTextSetDestinationSelection() ;
  183. extern Boolean _XmTextSetSel2() ;
  184. extern Boolean _XmTextGetSel2() ;
  185. extern void _XmTextInputGetSecResData() ;
  186. extern XmTextPosition _XmTextGetAnchor() ;
  187. extern void _XmTextInputCreate() ;
  188.  
  189. #else
  190.  
  191. extern Widget _XmTextGetDropReciever( 
  192.                         Widget w) ;
  193. extern Boolean _XmTextHasDestination( 
  194.                         Widget w) ;
  195. extern Boolean _XmTextSetDestinationSelection( 
  196.                         Widget w,
  197.                         XmTextPosition position,
  198. #if NeedWidePrototypes
  199.                         int disown,
  200. #else
  201.                         Boolean disown,
  202. #endif /* NeedWidePrototypes */
  203.                         Time set_time) ;
  204. extern Boolean _XmTextSetSel2( 
  205.                         XmTextWidget tw,
  206.                         XmTextPosition left,
  207.                         XmTextPosition right,
  208.                         Time set_time) ;
  209. extern Boolean _XmTextGetSel2( 
  210.                         XmTextWidget tw,
  211.                         XmTextPosition *left,
  212.                         XmTextPosition *right) ;
  213. extern void _XmTextInputGetSecResData( 
  214.                         XmSecondaryResourceData *secResDataRtn) ;
  215. extern XmTextPosition _XmTextGetAnchor( 
  216.                         XmTextWidget tw) ;
  217. extern void _XmTextInputCreate( 
  218.                         Widget wid,
  219.                         ArgList args,
  220.                         Cardinal num_args) ;
  221.  
  222. #endif /* _NO_PROTO */
  223. /********    End Private Function Declarations    ********/
  224.  
  225.  
  226. #ifdef __cplusplus
  227. }  /* Close scope of 'extern "C"' declaration which encloses file. */
  228. #endif
  229.  
  230. #endif /* _XmTextInP_h */
  231. /*DON'T ADD ANYTHING AFTER THIS #endif */
  232.